package com.ruibang.glass.equipment.entity.device;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruibang.glass.common.domain.camunda.BpmProcessBase;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/***
 * 检维修信息
 */
@Data
@ApiModel
@TableName(value = "g_equipment_repair")
public class RepairPlan extends BpmProcessBase implements Serializable {
    @ApiModelProperty(value = "检修Id")
    @TableId(value = "repair_id", type = IdType.ASSIGN_ID)
    private String repairId;
    @ApiModelProperty(value = "项目名称")
    private String projectName;
    @ApiModelProperty(value = "检修目的")
    private String repairPurpose;
    @ApiModelProperty(value = "区域")
    private String area;
    @ApiModelProperty(value = "区域名称")
    @TableField(exist = false)
    private String areaName;
    @ApiModelProperty(value = "设备Id")
    private String deviceId;
    @ApiModelProperty(value = "设备名称")
    private String deviceName;
    @ApiModelProperty(value = "专业")
    private String professionalId;
    @ApiModelProperty(value = "专业名称")
    @TableField(exist = false)
    private String professionalName;
    @ApiModelProperty(value = "工时")
    private Float manHour;
    @ApiModelProperty(value = "作业人数")
    private Integer personNumber;
    @ApiModelProperty(value = "项目负责人")
    private String projectLeader;
    @ApiModelProperty(value = "项目负责人名称")
    private String projectLeaderName;
    @ApiModelProperty(value = "施工单位")
    private String contractor;
    @ApiModelProperty(value = "计划开工时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime plannedStartTime;
    @ApiModelProperty(value = "计划完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime plannedCompletionTime;
    @ApiModelProperty(value = "是否涉及在线设备(1:是,0:否)")
    private String isInvolveDevice;
    @ApiModelProperty(value = "存在风险")
    private String existRisk;
    @ApiModelProperty(value = "动火许可")
    private String fireSafetyPermit;
    @ApiModelProperty(value = "检修电源")
    private String checkPower;
    @ApiModelProperty(value = "试运转")
    private String trialRun;
    @ApiModelProperty(value = "作业提示安全事项")
    private String safetyItems;
    @ApiModelProperty(value = "审批意见")
    private String opinion;
    @ApiModelProperty(value = "作业人员")
    @TableField(exist = false)
    private List<String> workPerson;
    @ApiModelProperty(value = "作业人员名称")
    @TableField(exist = false)
    private List<String> workPersonNames;
    @ApiModelProperty(value = "实际开工时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime actualStartTime;
    @ApiModelProperty(value = "实际完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime actualFinishTime;
    @ApiModelProperty(value = "方案/标准作业流程")
    @TableField(exist = false)
    private List<String> workFlowFiles;
    @ApiModelProperty(value = "停机挂牌单")
    @TableField(exist = false)
    private List<String> stopMachineFiles;
    @ApiModelProperty(value = "安全交底")
    @TableField(exist = false)
    private List<String> safetyFiles;
    @ApiModelProperty(value = "作业备注")
    private String workRemark;
    @ApiModelProperty(value = "确认人")
    private String confirmPerson;
    @ApiModelProperty(value = "确认人名称")
    private String confirmPersonName;
    @ApiModelProperty(value = "总结报告附件")
    @TableField(exist = false)
    private List<String> finalReportFiles;
    @ApiModelProperty(value = "确认备注")
    private String confirmRemark;
    @ApiModelProperty(value = "确认意见")
    private String confirmOpinion;

    @ApiModelProperty(value = "是否删除(1：是 0：否)")
    @TableLogic
    private String isDelete;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.UPDATE)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    private String processNode;
    @TableField(exist = false)
    private String currentUser;

    @TableField(exist = false)
    private String nodeName;
}
